/**
 * @file      uthread.h
 * @copyright Copyright (c) 2020, ZCW Co., Ltd. All Rights Reserved.
 * @brief     brief
 * @author    caiwang213@qq.com
 * @date      2020-05-16 23:20:02
 *
 * @note
 *  uthread.h defines
 */
#ifndef __UTHREAD_H__
#define __UTHREAD_H__
#include "ithread.h"

namespace log4x
{
class uthread : public ithread
{
protected:
    virtual void        sleep(long ms) override;

    virtual THREAD      start(void* (* entry)(void* , int), void* data, int id) override;
    virtual void        end(THREAD &t, int timeout) override;
    virtual void        detach(THREAD &t) override;
    virtual long        tid() override;

    virtual void      * get_tls() override;
    virtual void        set_tls(void* val) override;

    virtual void        init_mutex(MUTEX &mtx) override;
    virtual void        uninit_mutex(MUTEX &mtx) override;

    virtual void        lock(MUTEX &mtx) override;
    virtual void        unlock(MUTEX &mtx) override;
};
}
#endif
